package com.wu.foodsafetyplayer.app.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by dueeeke on 2017/6/1.
 */

public class MonitorVideoBean implements Parcelable {

    public List<DataBean> data;


    public static class DataBean implements Parcelable {
        /**
         * url : http://daxun.tpddns.cn:81/live/ch26_0_1.m3u8
         * name : 娴峰悍192.168.0.6
         */

        public String url;
        public String name;


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.url);
            dest.writeString(this.name);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.url = in.readString();
            this.name = in.readString();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(this.data);
    }

    public MonitorVideoBean() {
    }

    protected MonitorVideoBean(Parcel in) {
        this.data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Creator<MonitorVideoBean> CREATOR = new Creator<MonitorVideoBean>() {
        @Override
        public MonitorVideoBean createFromParcel(Parcel source) {
            return new MonitorVideoBean(source);
        }

        @Override
        public MonitorVideoBean[] newArray(int size) {
            return new MonitorVideoBean[size];
        }
    };
}
